#pragma once
#include "Output.h"
class DFDOutput : public Output
{
public:
	DFDOutput(int x, int y, int width, int height, char stroke[], int strokeWidth, char fill[]):
		Output(x, y, width, height, stroke, strokeWidth, fill)
	{
	}

public:
	DFDOutput(void);
	~DFDOutput(void);

	void Fill(MyGraphics* g)
	{
		// To Hinh chu nhat lon
		g->FillRectangle(_fill, _x, _y, _width, _height);
	}

	void Draw(MyGraphics* g)
	{
		Fill(g);

		// Ve duong thang thu 1
		g->DrawLine(_stroke, _strokeWidth, _x, _y, _x, _y + _height);

		// Ve duong thang thu 2
		g->DrawLine(_stroke, _strokeWidth, _x + _width / 8, _y, _x + _width / 8, _y + _height);

		// Ve duong thang thu 3
		g->DrawLine(_stroke, _strokeWidth, _x + _width * 7 / 8, _y, _x + _width * 7 / 8, _y + _height);

		// Ve duong thang thu 4
		g->DrawLine(_stroke, _strokeWidth, _x + _width, _y, _x + _width, _y + _height);

		// Ve duong thang thu 
		g->DrawLine(_stroke, _strokeWidth, _x, _y, _x + _width, _y);

		// Ve duong thang thu 
		g->DrawLine(_stroke, _strokeWidth, _x, _y + _height, _x + _width, _y + _height);
	}
};

